package tpo.lmhprovider.lmhprovider.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import pojo.Label;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface LabelMapper {

    List<Label> getLabel(Map map);

    @Update("update label set name=#{name},color=#{color} where id=#{id}")
    int updateLabel(Map map);

    @Insert("insert into label (name,color) values(#{name},#{color})")
    int addLabel(Map map);

    @Delete("delete from label where id=#{id}")
    int delLabel(Map map);
}
